package com.example.module_house.vm

import com.example.module_house.http.HouseApi
import com.example.module_house.http.HouseNetModule
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class HouseRepository @Inject constructor() {
    @Inject
    @HouseNetModule.CommonMainApi
    lateinit var houseApi:HouseApi
    fun getHouseList() = flow {
        emit(houseApi.getRegionList())
    }.flowOn(Dispatchers.IO)
}